<script>
     $( document ).ready(function() {
        // Handler for .ready() called.
        $( "#project_startdate,#project_enddate" ).datepicker({
            showOn: "button",
            buttonImage: "{$BASEURL}/resource/doc/images/icon/calendar.gif",
            buttonImageOnly: true,
            dateFormat : 'yy-mm-dd',
            setDate : new Date()
        });  
    }); 
</script>
<div class="breadcrum">
    <p>
        <a href="{$config->site_url('master/overview')}">Master</a>
        <span></span><a href="{$config->site_url('master/project')}">Project</a>
        <span></span><small>Edit Data {$result.project_name|default:''}</small>
    </p>
    <div class="clear"></div>
</div>  
<div class="sub-content">  
    <div class="navigation">  
        <div class="navigation-button">
            <ul>
                <li><a href="{$config->site_url('master/project/add')}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/add-icon.png">Tambah Data</a></li>
                <li><a href="{$config->site_url('master/project')}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/icon.notes.blue.png">Daftar Data</a></li> 
            </ul>
            <div class="clear"></div>
        </div>
    </div> 
    <!-- notification template -->
    {include file="base/templates/notification.html"}
    <!-- end of notification template--> 
    <form action="{$config->site_url('master/project/edit_process')}" method="post">
        <input type="hidden" name="project_id" value="{$result.project_id|default:''}">
        <table width="100%" class="table-input">
            <tbody>
                <tr class="headrow">
                    <th colspan="2">Edit Project</th>
                </tr> 
                <tr>
                    <td>Nama</td>
                    <td>
                        <input type="text" maxlength="200" size="100" value="{$result.project_name|default:''}" name="project_name">
                        <small>* wajib diisi</small>
                    </td> 
                </tr> 
                <tr>
                    <td>Perusahaan</td>
                    <td>
                        <select name="perusahaan_id" style="width: 300px;">
                            <option value=""></option>
                            {foreach from=$rs_perusahaan item=data}
                            <option value="{$data.perusahaan_id|default:''}" {if $result.perusahaan_id == $data.perusahaan_id} selected="selected"{/if}>{$data.perusahaan_nama|default:''}</option>
                            {/foreach}
                        </select>
                        <small>* wajib diisi</small>
                    </td> 
                </tr>
                <tr>
                    <td>Klien</td>
                    <td>
                        <select name="klien_id" style="width: 300px;">
                            <option value=""></option>
                            {foreach from=$rs_klien item=data}
                            <option value="{$data.klien_id|default:''}" {if $result.klien_id == $data.klien_id} selected="selected"{/if}>{$data.klien_nama|default:''}</option>
                            {/foreach}
                        </select> 
                        <small>* wajib diisi</small>
                    </td> 
                </tr>
                <tr>
                    <td>PM</td>
                    <td>
                        <select name="project_pm" style="width: 300px;">
                            <option value=""></option>
                            {foreach from=$rs_pm item=data}
                            <option value="{$data.user_id|default:''}" {if $result.project_pm == $data.user_id} selected="selected"{/if}>{$data.petugas_name|default:''}</option>
                            {/foreach}
                        </select> 
                        <small>* wajib diisi</small>
                    </td> 
                </tr> 
                <tr>
                    <td>Periode Project(Mulai - Selesai)</td>
                    <td>
                        <input type="text" maxlength="10" size="10" readonly="readonly" value="{$result.project_startdate|default:''}" name="project_startdate" id="project_startdate"> - <input type="text" maxlength="10" size="10" value="{$result.project_enddate|default:''}" name="project_enddate" id="project_enddate" readonly="readonly">
                        <small>* wajib diisi</small>
                    </td> 
                </tr> 
                <tr>
                    <td>Sosialisasi</td>
                    <td>
                        <select name="project_sosialisasi" style="width: 75px;"> 
                            <option value="1" {if $result.project_sosialisasi == '1'} selected="selected"{/if}>Sudah</option> 
                            <option value="0" {if $result.project_sosialisasi != '1'} selected="selected"{/if}>Belum</option> 
                        </select> 
                        <small>* wajib diisi</small>
                    </td> 
                </tr>
                <tr>
                    <td>Pelatihan</td>
                    <td>
                        <select name="project_pelatihan" style="width: 75px;"> 
                            <option value="1" {if $result.project_pelatihan == '1'} selected="selected"{/if}>Sudah</option> 
                            <option value="0" {if $result.project_pelatihan != '1'} selected="selected"{/if}>Belum</option> 
                        </select> 
                        <small>* wajib diisi</small>
                    </td> 
                </tr>
                <tr>
                    <td valign="top">Deskripsi</td>
                    <td>
                        <textarea rows="5" cols="100" name="project_description">{$result.project_description|default:''}</textarea> 
                    </td> 
                </tr> 
                <tr>
                    <td valign="top">KAK</td>
                    <td>
                        <textarea rows="5" cols="100" name="project_kak">{$result.project_kak|default:''}</textarea> 
                    </td> 
                </tr>
                <tr>
                    <td valign="top">Kontak Person Klien</td>
                    <td>
                        <textarea rows="5" cols="100" name="project_cpklien">{$result.project_cpklien|default:''}</textarea> 
                    </td> 
                </tr> 
                <tr class="submit-box">
                    <td colspan="2">
                        <input type="submit" class="edit-button" value="Simpan" name="save[insert]">
                        <input type="reset" class="edit-button" value="Reset" name="save[reset]">
                    </td>
                </tr>
            </tbody>
        </table>
    </form> 
</div>